/*
 * @Author       : Zou Kai
 * @Date         : 2024-11-18 11:02:11
 * @Last Modified by: Your Name
 * @Last Modified time: 
 * @Description  : 
 */

#include<Eigen/Core>
#include "yaml-cpp/yaml.h"
#include<opencv2/opencv.hpp>
#include <pcl/point_cloud.h>
#include<opencv2/core/eigen.hpp>

class SquareProject
{
public:
    SquareProject();
    ~SquareProject(){};
    bool Init(const std::string extrinic_file, const std::string intrinsic_file, 
            const std::string device_name,const int project_model, const float error_threshold);
    bool FarthestPointPixel(pcl::PointCloud<pcl::PointXYZI>::Ptr cloud);
    std::map<int, std::vector<cv::Point2d>> ErrorProject();

private:
    bool LoadIntrinsic(const std::string filename);
    bool LoadExtrinsic(const std::string filename, const std::string camera_name);
    std::string extrinsic_file_;
    std::string intrinsic_file_;
    float error_threshold_;
    std::string device_name_;


public:
    ProjectorConfig ProjectConfig_;
};

